   <Br/>
<div class="fl-option-toolbar">
    <div class="orgchart icon"></div>
    <div class="fl-toolbar-left-wrapper">
      <h1>Organizational Chart</h1>
    </div>
    <div class="fl-toolbar-right-wrapper">
        <!-- <a class="pinit icon dataTip" data-placement="left" data-original-title="Pin this to Dashboard"></a> -->
    </div>
    <div class="clearfix"></div>
  </div><!-- end of option toolbar -->
<div id="pageContent">
  <div id="positionButtonDiv">
<p><span> <img id="zoomInButton" style="width:23px; height:23px;" class="zoomButton" src="/images/themes/zoomIn.png" title="zoom in" alt="zoom in" /> <img id="zoomOutButton"  style="width:23px; height:23px;" class="zoomButton" src="/images/themes/zoomOut.png" title="zoom out" alt="zoom out" /> </span> </p>
<p> <span class="positionButtonSpan">
<name="positionMap" class="positionMapClass">
<area id="topPositionMap" shape="rect" coords="20,0,40,20" title="move up" alt="move up"/>
<area id="leftPositionMap" shape="rect" coords="0,20,20,40" title="move left" alt="move left"/>
<area id="rightPositionMap" shape="rect" coords="40,20,60,40" title="move right" alt="move right"/>
<area id="bottomPositionMap" shape="rect" coords="20,40,40,60" title="move bottom" alt="move bottom"/>
</map>
<!-- <img src="images/themes/position.png" usemap="#positionMap" style="width:23px; height:23px;" /> </span> --> </p>
</div>
<div id="imgContainer">
  <!-- <img id="imageFullScreen" src="images/themes/zoomFullScreen.jpg"/> </div> -->
  <!-- <div style="display:table-cell"> -->
  <div id="imageFullScreen" class="workspace orgchart_ws" style="position:relative;overflow:auto;margin-top: 10px;width:2000px;height:200px;border: none;
background: none;">
      <!-- Node -->
   </div>
<!-- </div> -->

</div>
<?php
      $auth = Auth::getAuth('current_user');
      $db = new Database();
      $company_id = $auth['company_id'];
      $search = new Search();
      //$orgchart_id = functions::getMethod_replace($id,"-","+");
      
      // if(isset($id)){
         
         //Get orgchart information and nodes query
        
         $orgchart = $search->getActiveOrgchart();
         $orgchart_id = $orgchart[0]['id'];
         $orgchart_nodes_array = $db->query("SELECT *, tbo.json as tbo_json FROM tborgchart tbo LEFT JOIN tborgchartobjects tboo
                                     on tbo.id = tboo.orgChart_id 
                                     WHERE tbo.id = {$db->escape($orgchart_id)} and tbo.is_active = 1","array");
         if(count($orgchart)==0){
            header("location:/");
         }
         // if($orgchart[0]['']){
         //    // header("location:/");
         // }
         $ws_size = json_decode($orgchart_nodes_array[0]['tbo_json'],true);
         $ws_height = $ws_size['height'];
         $ws_width = $ws_size['width'];
         //node array
         $nodes_json = array();
         //extract nodes and add to array
         foreach($orgchart_nodes_array as $orgchart_nodes){
            array_push($nodes_json,$orgchart_nodes['json']);
         }
         //convert array to json array
         $nodes_json =  htmlspecialchars(json_encode($nodes_json));
         
         //Get orgchart lines query
         $orgchart_lines_array = $db->query("SELECT * FROM tborgchartline 
                                     WHERE orgChart_id = {$db->escape($orgchart_id)}","array");
         $orchart_numrows = $db->query("SELECT * FROM tborgchartline 
                                     WHERE orgChart_id = {$db->escape($orgchart_id)}","numrows");
         if($orchart_numrows>0){
            //echo "1";
         }
         //lines array
         $lines_json = array();
         //extract lines and add to array
         foreach($orgchart_lines_array as $orgchart_lines){
            array_push($lines_json,$orgchart_lines['json']);
         }
         $lines_json = json_encode($lines_json);
            
      // }
      ?>
      <input type="text" class="userLevel display" value="<?php echo $auth['user_level_id']; ?>">
      <div id="orgchart_nodes" class="display"><?php echo $nodes_json; ?></div>
      <div id="orgchart_lines" class="display"><?php echo $lines_json; ?></div>
      <div id="orgchart_height" class="display"><?php echo $ws_height; ?></div>
      <div id="orgchart_width" class="display"><?php echo $ws_width; ?></div>